var t = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../http/coupon")), e = getApp();

new t.default();

Component({
    properties: {
        couponHistoryId: {
            type: String
        },
        couponList: {
            type: Array
        }
    },
    data: {
        show: !1,
        safeAreaHeight: 0,
        list: []
    },
    attached: function() {
        this.setData({
            safeAreaHeight: e.global.systemInfo.safeAreaHeight
        });
    },
    methods: {
        onClose: function() {
            this.setData({
                show: !1
            });
        },
        showPopup: function() {
            this.setData({
                show: !0
            });
        },
        tapping: function(t) {
            var e = "", o = "";
            t.detail.coupon && (e = t.detail.coupon.couponHistoryId, o = t.detail.coupon.expressType), 
            this.triggerEvent("sendCouponHistoryId", {
                couponHistoryId: e,
                expressType: o
            }), this.onClose();
        },
        noUse: function() {
            this.properties.couponHistoryId ? (this.triggerEvent("sendCouponHistoryId", {
                couponHistoryId: ""
            }), this.onClose()) : this.onClose();
        }
    }
});